<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAppletInformationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('applet_information', function (Blueprint $table) {
            $table->increments('id');
            $table->string('authorizer_appid')->nullable()->comment('小程序appid');
            $table->string('authorization_code')->nullable()->comment('授权方返回授权码');
            $table->string('authorizer_access_token')->nullable()->comment('授权方接口调用凭据，也简称为令牌');
            $table->integer('authorizer_access_token_time')->nullable()->comment('令牌有效期:2小时');
            $table->string('authorizer_refresh_token')->nullable()->comment('刷新令牌');
            $table->dateTime('authorization_time')->nullable()->comment('授权时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('applet_information');
    }
}
